﻿create  proc [dbo].[danhmucTyGia_Them]
@thang varchar(5),
@nam varchar(5),
@nt varchar(10),
@tygia float

as
if exists(select * from DM_tygia   Where thang <>@thang  and nam =@nam and nt=@nt  )
begin
select ErrCode=0
end
else
begin
insert into DM_tygia (thang,nam,nt,tygia )
				values(@thang,@nam,@nt,@tygia) 
select ErrCode=1
end